<template>
  <view v-if="permission" class="custom-modular">
    <view class="top flex flex-justify-between">
      <text class="text-28rpx text-#1c213e">{{ title }}</text>
      <slot name="right"></slot>
    </view>
    <view class="flex">
      <slot name="content"></slot>
    </view>
  </view>
</template>

<script name="customModular" setup>
const props = defineProps({
  title: {
    type: String,
    default: ''
  },
  permission: {
    type: Boolean,
    default: true
  }
});
</script>

<style lang="scss" scoped>
.custom-modular {
  padding: 32rpx 24rpx 40rpx;
  background: #ffffff;
  border-radius: 4px 4px 4px 4px;
  margin-top: 24rpx;
  .top {
    font-weight: 600;
  }
}
</style>
